home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / Developer Essentials Jul 90 / International System⁄HyperCard / KanjiTalk Toolkit / Sample Code / KeyScript / KeyScriptGlue.a < prev   
Encoding:
Text File  |  2002-01-01  |  1.2 KB  |  45 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    Apple Macintosh Developer Technical Support
  3. ;
  4. ;    MultiFinder-Aware TextEdit Sample Application
  5. ;
  6. ;    KeyScript
  7. ;
  8. ;    KeyScriptGlue.a    -    Assembler Source
  9. ;
  10. ;    Copyright © 1989 Apple Computer, Inc.
  11. ;    All rights reserved.
  12. ;
  13. ;
  14. ;    AsmClikLoop
  15. ;
  16. ;    This routine gets called by the TextEdit Manager from TEClick.
  17. ;    It calls the old, default click loop routine that scrolls the
  18. ;    text, and then calls our own Pascal routine that handles
  19. ;    tracking the scroll bars to follow along.  It doesn't bother
  20. ;    with saving registers A0 and D0, because they are trashed
  21. ;    anyway by TextEdit.
  22. ;
  23.  
  24. AsmClikLoop    PROC        EXPORT
  25.  
  26.             IMPORT        GETOLDCLIKLOOP
  27.             IMPORT        PASCALCLIKLOOP
  28.             
  29.             MOVEM.L        D1-D2/A1,-(SP)        ; D0 and A0 need not be saved
  30.             CLR.L        -(SP)                ; make space for procedure pointer
  31.             JSR            GETOLDCLIKLOOP        ; get the old clikLoop
  32.             MOVEA.L        (SP)+,A0            ; into A0
  33.             MOVEM.L        (SP)+,D1-D2/A1        ; restore the world as it was
  34.             
  35.             JSR            (A0)                ; and execute old clikLoop
  36.  
  37.             MOVEM.L        D1-D2/A1,-(SP)        ; D0 and A0 need not be saved
  38.             JSR            PASCALCLIKLOOP        ; do our clikLoop
  39.             MOVEM.L        (SP)+,D1-D2/A1        ; restore the world as it was
  40.             MOVEQ        #1,D0                ; clear the zero flag so TextEdit keeps going
  41.             RTS
  42.  
  43.             END 
  44.  
  45.